# 输出二维数组
def show2d(b):
    for i in range(len(b)):
        for j in range(len(b[i])):
            print('%2d' % b[i][j])
        print()


# 创建一个二维数组 行数row,列数为col
def create2d(row, col):
    b = []
    for i in range(row):
        b.append(list([0] * col))
    return b


n = int(input())
m = 2 * n + 1
b = create2d(m, m)
for i in range(m):
    for j in range(m):
        if abs(i-n) > abs(j-n):
            b[i][j] = abs(i-n)
        else:
            b[i][j] = abs(j-n)
        

show2d(b)
